package com.sam;

import com.sam.controller.SaMController;
import com.sam.stream.CamStream;
import com.sam.stream.FileStream;
import com.sam.stream.StreamFactory;

public class MainController
{

	StreamFactory sF;
	SaMController samCon;

	private static MainController instance;

	private MainController()
	{

	}

	public static synchronized MainController getInstance()
	{
		if (instance == null)
			instance = new MainController();

		return instance;
	}

	public void startFactroy(String vidPath)
	{
		sF = new StreamFactory();
		CamStream cs = (CamStream) sF.create(2,null);
		FileStream fs = (FileStream) sF.create(1,vidPath);
		samCon = new SaMController(fs, cs);
	}

}
